/*
 * @Author: 梦付千秋星垂野 465943794@qq.com
 * @Date: 2022-10-13 14:24:09
 * @LastEditors: 梦付千秋星垂野 465943794@qq.com
 * @LastEditTime: 2022-10-13 15:03:17
 * @FilePath: /practise--chat-app-react-nodejs/pubilc/src/test/test_useState.jsx
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import React, { useEffect, useState } from "react";
const App2 = () => {
    const [count , setCount] = useState(0)
    const handleClick =() => {
        setTimeout(()=>{
            setCount(count+1)
            console.log('111')
        },3000)
        console.log('222')
    }
    return (
        <div>
            {count}
            <button onClick={handleClick}>点击我</button>
        </div>
    );
};

export default App2;
